interface IOption {
  value: number | string;
  label: string;
}
// 链管理，链连接状态
export const CHAIN_STATUS = {
  CONN_INIT: 0,
  CONN_SUCCESS: 1,
  CONN_FAIL: 2,
};

// 链管理，链连接状态
export const CHAIN_STATUS_OPTIONS: Array<IOption> = [
  { value: CHAIN_STATUS.CONN_INIT, label: '未连接' },
  { value: CHAIN_STATUS.CONN_SUCCESS, label: '连接成功' },
  { value: CHAIN_STATUS.CONN_FAIL, label: '连接异常' },
];


// 模块枚举
export const MODULES = {
  EVM: 0,
  CONTR: 1,
  CONSE: 2,
  PRIV: 3,
  TRADE: 4,
  NET: 5,
  DATA: 6,
  ELSE: 99,
};

// 模块枚举
export const MODULES_OPTIONS: Array<IOption> = [
  { value: MODULES.EVM, label: '虚拟机' },
  { value: MODULES.CONTR, label: '合约' },
  { value: MODULES.CONSE, label: '共识' },
  { value: MODULES.PRIV, label: '权限' },
  { value: MODULES.TRADE, label: '交易池' },
  { value: MODULES.NET, label: '网络' },
  { value: MODULES.DATA, label: '数据库' },
  { value: MODULES.ELSE, label: '其他' },
];

// 功能测试---执行记录--测试记录详情页---测试用例执行状态
export const CASE_STATUS = {
  INIT: 0,
  RUN: 1,
  SUCCESS: 2,
  FAIL: 3,
};

// 测试用例最后执行结果
export const CASE_STATUS_OPTIONS: Array<IOption> = [
  { value: CASE_STATUS.INIT, label: '未执行' },
  { value: CASE_STATUS.RUN, label: '执行中' },
  { value: CASE_STATUS.SUCCESS, label: '成功' },
  { value: CASE_STATUS.FAIL, label: '失败' },
];



export const TESTCASE_PRIORITY_OPTIONS = [
  { value: 0, label: 'High', checked: false},
  { value: 1, label: 'Normal', checked: false},
  { value: 2, label: 'Low', checked: false},
  { value: 3, label: 'BVT', checked: false},
];
export const CONSENSUS_TYPE = {
  TBFT: 0,
  RAFT: 1,
  DPOS: 2,
};

export const AUTH_TYPE_STATUS = {
  PK: 0,
  CERT: 1,
  PWK: 2,
};

export const AUTH_TYPE_OPTIONS: Array<IOption>  = [
  {value: AUTH_TYPE_STATUS.PK, label: 'PK'},
  {value: AUTH_TYPE_STATUS.CERT, label: 'CERT'},
  {value: AUTH_TYPE_STATUS.PWK, label: 'PWK'},
];


export const CRYPTO_HASH_STATUS = {
  SM3: 0,
  SHA256: 1,
};

export const CRYPTO_HASH_OPTIONS: Array<IOption>  = [
  {value: CRYPTO_HASH_STATUS.SM3, label: 'SM3'},
  {value: CRYPTO_HASH_STATUS.SHA256, label: 'SHA256'},
];


// 主机列表页，主机的连接状态
export const LINK_STATUS = {
  FAIL: 0,
  SUCCESS: 1,
  EXCEPTION: 2,
};
// 主机列表页，连接状态的枚举
export const LINK_STATUS_OPTIONS: Array<IOption> = [
  { value: LINK_STATUS.FAIL, label: '链接失败' },
  { value: LINK_STATUS.SUCCESS, label: '链接成功' },
  { value: LINK_STATUS.EXCEPTION, label: '链接异常' },
];


// export const CASE_STATUS = {
//   INIT: 0,
//   PENDING: 1,
//   SUCCESS: 2,
//   FAIL: 3,
// };

// export const CASE_STATUS_OPTIONS: Array<IOption> = [
//   { value: RECORD_STATUS.INIT, label: '未执行' },
//   { value: RECORD_STATUS.PENDING, label: '执行中' },
//   { value: RECORD_STATUS.SUCCESS, label: '执行成功' },
//   { value: RECORD_STATUS.FAIL, label: '执行失败' },
// ];

// 功能测试---执行记录--执行状态
export const RECORD_STATUS = {
  INIT: 0,
  PENDING: 1,
  SUCCESS: 2,
  FAIL: 3,
};

export const RECORD_STATUS_OPTIONS: Array<IOption> = [
  { value: RECORD_STATUS.INIT, label: '未执行' },
  { value: RECORD_STATUS.PENDING, label: '执行中' },
  { value: RECORD_STATUS.SUCCESS, label: '执行成功' },
  { value: RECORD_STATUS.FAIL, label: '执行失败' },
];

// 功能测试---测试计划--测试计划执行结果

export const TESTPLAN_STATUS = {
  INIT: 0,
  SUCCESS: 1,
  PENDING: 2,
  FAIL: 3,
};

export const TESTPLAN_STATUS_OPTIONS: Array<IOption> = [
  { value: TESTPLAN_STATUS.INIT, label: '未执行' },
  { value: TESTPLAN_STATUS.PENDING, label: '执行中' },
  { value: TESTPLAN_STATUS.SUCCESS, label: '执行成功' },
  { value: TESTPLAN_STATUS.FAIL, label: '执行失败' },
];

export const CRON_STATE = {
  DOWN: 0,
  UP: 1,
};